From: Giovanni Campagna Date: Sun, 18 Aug 2013 16:26:37 +0000 (+0200) Subject: ShellAppSystem: handle desktop files with capital letters X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~3714 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=2acd23b14ce0ee0b4da1256c35b759add37cd53c;p=gnome-shell.git ShellAppSystem: handle desktop files with capital letters This is needed to handle applications that are converted to reverse dns notation, if their application ID includes capital letters (as it is often the case for DBus names) https://bugzilla.gnome.org/show_bug.cgi?id=706252 --- diff --git a/src/shell-app-system.c b/src/shell-app-system.c index 7f43bd4b0..ad27ade85 100644 --- a/src/shell-app-system.c +++ b/src/shell-app-system.c @@ -559,6 +559,20 @@ shell_app_system_lookup_desktop_wmclass (ShellAppSystem *system, if (wmclass == NULL) return NULL; + /* First try without changing the case (this handles + org.example.Foo.Bar.desktop applications) + + Note that is slightly wrong in that Gtk+ would set + the WM_CLASS to Org.example.Foo.Bar, but it also + sets the instance part to org.example.Foo.Bar, so we're ok + */ + desktop_file = g_strconcat (wmclass, ".desktop", NULL); + app = shell_app_system_lookup_heuristic_basename (system, desktop_file); + g_free (desktop_file); + + if (app) + return app; + canonicalized = g_ascii_strdown (wmclass, -1); /* This handles "Fedora Eclipse", probably others.